﻿using Microsoft.EntityFrameworkCore.Metadata.Internal;
using S.PurchaseAndSales.Domain.Enum;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;

namespace S.PurchaseAndSales.Api.Dto
{
    /// <summary>
    /// 批量添加采购表
    /// </summary>
    public class AddRangePurchaseFormDto
    {
        /// <summary>
        /// 批次/耳号
        /// </summary>
        [MaxLength(50)]
        public string BatchEarHorns { get; set; }

        /// <summary>
        /// 栋舍名称
        /// </summary>
        public string BuildingName { get; set; }

        /// <summary>
        /// 转入栏位名称
        /// </summary>
        public int? ColumnName { get; set; }

        /// <summary>
        /// 性别 true男  false 女
        /// </summary>
        public bool? Gender { get; set; }

        /// <summary>
        /// 商品名称
        /// </summary>
        [MaxLength(50)]
        public string? GoodName { get; set; }

        /// <summary>
        /// 标包
        /// </summary>
        [MaxLength(50)]
        public string? LabelPackage { get; set; }

        /// <summary>
        /// 计量单位
        /// </summary>
        [MaxLength(50)]
        public string? UnitOfMeasure { get; set; }


        /// <summary>
        /// 入库数量
        /// </summary>
        public int InboundQuantity { get; set; }


        /// <summary>
        /// 只均单元（元）
        /// </summary>
        [Column(TypeName = "decimal(10,2)")]
        public decimal? AverageUnitOnly { get; set; }

        /// <summary>
        /// 金额
        /// </summary>
        [Column(TypeName = "decimal(10,2)")]
        public decimal Amount { get; set; }
        /// <summary>
        /// 单位折扣（元）
        /// </summary>
        [Column(TypeName = "decimal(10,2)")]
        public decimal? UnitDiscounts { get; set; }
        /// <summary>
        /// 调整金额（元）
        /// </summary>
        [Column(TypeName = "decimal(10,2)")]
        public decimal AdjustTheAmount { get; set; }

        /// <summary>
        /// 结算金额（元）
        /// </summary>
        [Column(TypeName = "decimal(10,2)")]
        public decimal? SettlementAmount { get; set; }

        /// <summary>
        /// 总重量（公斤）
        /// </summary>
        [Column(TypeName = "decimal(10,2)")]
        public decimal TotalWeight { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [MaxLength(200)]
        public string? PurchaseFormDesc { get; set; }

        /// <summary>
        /// 摘要
        /// </summary>
        public SummaryEnum SummaryEnum { get; set; }

        /// <summary>
        /// 单据号
        /// </summary>
        [MaxLength(50)]
        public string TheDocumentNumber { get; set; }

        /// <summary>
        /// 仓库（羊场总仓库）
        /// </summary>
        [MaxLength(50)]
        public string Warehouse { get; set; }

    }
}
